// Bootstrap Daterangepicker 日期范围

// Base
.daterangepicker {
    padding: 0;
    margin: 0;
    width: auto;
    box-shadow: $e-dropdown-shadow;
    border-radius: $e-border-radius;
    border: 0;
    font-family: $e-font-families;
    z-index: $e-dropdown-z-index;

    .modal-open & {
        z-index: $e-modal-z-index + 1;
    }

    &:after,
    &:before {
        display: none;
    }

    @include e-not-rounded {
        border-radius: 0 !important;
    }

    .ranges {
        ul {
            padding: 1rem 0;
            width: 170px;
        }

        li {
            padding: .7rem 1.75rem;
            font-weight: 400;
            font-size: 1rem;
            color: e-base-color(label, 3);
            transition: color .3s ease;

            &:hover,
            &.active {
                background-color: e-base-color(grey, 1);
                color: e-brand-color();
                transition: color .3s ease;
            }
        }            
    }

    &.show-calendar {
        .ranges {
            border-right: 1px solid e-base-color(grey, 2);
        }
    }

    &.show-ranges.ltr {
        .drp-calendar.left {
            border-left: 0;
        }
    }

    &.show-calendar {
        .ranges {
            margin-top: 0;
        }
    }

    .drp-buttons {
        padding: 1rem 1.75rem; 
        border-top: 1px solid e-base-color(grey, 2);

       .btn {
            font-size: .9rem;
            font-weight: 400;
            padding: .5rem 1rem;
            border-radius: 0;

            @include e-rounded {
                border-radius: $e-border-radius;
            }
        }
    }

    .drp-calendar {
        &.left,
        &.right {
            padding: 1rem 1.5rem 1rem 1.5rem; 
        }   

        th {
            font-weight: 500; 
            font-size: 1rem;
            color: e-base-color(label, 3);

            &.month {
                font-weight: 400; 
                color: e-base-color(label, 2);
            }

            &.next,
            &.prev {
                span {
                    border-width: 0 1px 1px 0;
                    border-color: e-base-color(label, 2);
                }
            }

            &.next {
                span {
                    margin-right: 1px; 
                }
            }

            &.prev {
                span {
                    margin-left: 1px;
                }
            }
        }

        td {
            font-size: 1rem;
            color: e-base-color(label, 3);

            &.available.off {
                color: e-base-color(label, 1);
            }

            &.active {
                background-color: e-brand-color();
                color: e-brand-color(inverse);
                border-radius: 0;

                @include e-rounded {
                    border-radius: $e-border-radius;
                }
                
                &.start-date {
                    border-top-right-radius: 0;
                    border-bottom-right-radius: 0;
                }

                &.end-date {
                    border-top-left-radius: 0;
                    border-bottom-left-radius: 0;
                }

                &.start-date.end-date {
                    @include e-rounded {
                        border-radius: $e-border-radius;
                    }
                }
            }

            &.today,
            &.today.active {
                border-radius: 0;

                @include e-rounded {
                    border-radius: $e-border-radius;
                }

                background: rgba(e-state-color(brand, base), .7) !important;
                color: e-state-color(brand, inverse) !important;
            }

            &.in-range.available:not(.active):not(.off):not(.today) {
                background-color: e-base-color(grey, 1);
                color: e-base-color(label, 3);
            }
        }
    }

    select {
        @include e-rounded {
            border-radius: $e-border-radius;
        }
        background: transparent !important;
        border-color: e-base-color(grey, 2);
        color: e-base-color(label, 3);
    }
}